<?php
/**
 * Junction_Sql_Operator
 * 
 * Models an SQL operator
 * 
 * @author Patrick J. Mizer <patrick.mizer@gmail.com>
 */
 
using("Junction_Sql_Writable"); 
 
class Junction_Sql_Operator implements Junction_Sql_Writable
{
	/**
	 * Equal operator.
	 * 
	 * @var int
	 */
	const EQUAL_SYMBOL = '=';
	
	/**
	 * Not equal operator.
	 * 
	 * @var int
	 */
	const NOT_EQUAL_SYMBOL = '!=';
	
	/**
	 * Greater than operator.
	 * 
	 * @var int
	 */
	const GREATER_THAN_SYMBOL = '>';
	
	/**
	 * Less than operator
	 * 
	 * @var int
	 */
	const LESS_THAN_SYMBOL = '<';
	
	/**
	 * Greater than or equal to operator.
	 * 
	 * @var int
	 */
	const GREATER_THAN_OR_EQUAL_SYMBOL = '>=';
	
	/**
	 * Less than or equal to operator.
	 * 
	 * @var int
	 */
	const LESS_THAN_OR_EQUAL_SYMBOL = '<=';
	
	/**
	 * AND operator
	 * 
	 * @var string
	 */
	const AND_SYMBOL = 'AND';
	
	/**
	 * OR operator
	 * 
	 * @var string
	 */
	const OR_SYMBOL = 'OR';
	
	/**
	 * AND NOT operator
	 * 
	 * @var string
	 */
	const AND_NOT_SYMBOL = 'AND NOT';
	
	/**
	 * OR NOT operator
	 * 
	 * @var string
	 */
	const OR_NOT_SYMBOL = 'OR NOT';	
	
	
	/**
	 * Junction_Sql_Operator Constructor
	 * 
	 * @param string operator symbol
	 */
	public function __construct($symbol)
	{
		$this->_symbol = $symbol;
	}
	
	/**
	 * Getter for symbol
	 * 
	 * @return string symbol
	 */
	public function getSymbol()
	{
		return $this->_symbol;
	}
	
	/**
	 * Implemented getSqlString from Junction_Sql_Writble
	 * interface.  This is how the operator is represented
	 * in SQL.
	 * 
	 * @return string
	 */
	public function getSqlString()
	{
		return $this->_symbol;
	}
	
	
}
?>